/*

This file is part of Zephyr.

    Zephyr is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Zephyr is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Zephyr.  If not, see <http://www.gnu.org/licenses/>.

*/

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <aboutwindow.h>
#include <createnewconnection.h>
#include <openconnection.h>
#include <LightMaps.h>

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
    LightMaps *map; //Pointer to light maps so it can be properly created and destroyed when needed
    aboutWindow *aboutWin; //Pointer to about window so it can be properly created and destroyed when needed
    createNewConnection *newConnect; //Pointer to create new connection window so it can be properly created and destroyed when needed
    openConnection *openConnect; //Pointer to open saved connection window so it can be properly created and destroyed when needed
    int curTab; // Holds the current tab value
    QHBoxLayout *mapLayoutResize;
    bool connected;
    QTcpSocket *socket;

private slots:
    void on_openConnection_clicked(); // Open connection function
    void on_newConnection_clicked(); // New connection function
    void on_actionQuit_triggered(); //Quit button function
    void on_actionAbout_Zephyr_triggered(); //About button function
    void on_actionShow_Side_Panel_triggered(); // Hide Side Panel function
    void on_actionShow_Buttons_triggered(); // Hide Side Panel buttons function
    void on_actionShow_Data_Feed_triggered(); // Hide Data feed function
    void on_actionClear_Cache_triggered(); // clear cache function
    void changeTextBrowsers(int); //Function to change text browsers in the tab widget.
    void receivedIncomingData();
    void connectButtonPressed(QString,QString,QString,QString,bool);
    void updateTextBrowser();
};

#endif // MAINWINDOW_H
